From: Marina Zhurakhinskaya Date: Wed, 12 May 2010 19:19:40 +0000 (-0400) Subject: Make the workspace added on the middle mouse button click active X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~10093 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ec6bc8f216b37801aedf215661ab424fdd824222;p=gnome-shell.git Make the workspace added on the middle mouse button click active This ensures that we launch the new instance of an application on the newly added workspace in the grid view, in which we don't make the newly added workspace active by default. https://bugzilla.gnome.org/show_bug.cgi?id=591645 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 14a3e195f..29aeaa891 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -458,7 +458,8 @@ AppWellIcon.prototype = { if (button == 1) { this._onActivate(event); } else if (button == 2) { - Main.overview.workspaces.addWorkspace(); + let newWorkspace = Main.overview.workspaces.addWorkspace(); + newWorkspace.activate(global.get_current_time()); this.emit('launching'); this.app.open_new_window(); Main.overview.hide(); diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index b34c222d0..8624cee0c 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -445,7 +445,7 @@ MosaicView.prototype = { }, addWorkspace: function() { - global.screen.append_new_workspace(false, global.get_current_time()); + return global.screen.append_new_workspace(false, global.get_current_time()); }, canRemoveWorkspace: function() { @@ -1395,6 +1395,7 @@ SingleView.prototype = { let ws = global.screen.append_new_workspace(false, global.get_current_time()); ws.activate(global.get_current_time()); + return ws; }, removeWorkspace: function() {